package java51.homework;

import java.io.File;
import java.io.IOException;
import java.util.Scanner;

public class RenameToTest {

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		// System.out.println("输入具体要剪切的文件路径");
		// String s3 = sc.next();
		System.out.println("文件名：");
		String s = sc.next();
		File f1 = new File(s);
		System.out.println("输入要转移到的的文件夹");
		String s2 = sc.next();
		File f2 = new File(s2, s);
		if (f1.exists() && f2.exists()) {
			boolean b = f1.renameTo(f2);
			System.out.println("剪切是否成功：" + b);

		}
	}
}
